/*
 *    Copyright (c) 2018-2025, lengleng All rights reserved.
 *
 * Redistribution and use in source and binary forms, with or without
 * modification, are permitted provided that the following conditions are met:
 *
 * Redistributions of source code must retain the above copyright notice,
 * this list of conditions and the following disclaimer.
 * Redistributions in binary form must reproduce the above copyright
 * notice, this list of conditions and the following disclaimer in the
 * documentation and/or other materials provided with the distribution.
 * Neither the name of the pig4cloud.com developer nor the names of its
 * contributors may be used to endorse or promote products derived from
 * this software without specific prior written permission.
 * Author: lengleng (wangiegie@gmail.com)
 */

package com.pig4cloud.pigx.strategy.entity;


import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableLogic;
import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.extension.activerecord.Model;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
import com.pig4cloud.pigx.common.customize.utils.serializer.BigDecimalToPlainStringSerializer;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;

import java.math.BigDecimal;
import java.time.LocalDateTime;

/**
 * 策略组-合约
 *
 * @since 2022-11-24 10:39:27
 */
@Data
@TableName("strategy_group_contract")
@EqualsAndHashCode(callSuper = true)
@ApiModel(value = "策略组-合约")
public class StrategyGroupContract extends Model<StrategyGroupContract> {

	private static final long serialVersionUID = 1L;

	/**
	 * 主键
	 */
	@TableId(type = IdType.ASSIGN_ID)
	@ApiModelProperty(value = "主键")
	@JsonSerialize(using = ToStringSerializer.class)
	private Long id;

	/**
	 * 产品种类（0永续合约）
	 */
	@ApiModelProperty(value = "产品种类（0永续合约）")
	private String productType;

	/**
	 * 名称
	 */
	@ApiModelProperty(value = "名称")
	private String name;

	/**
	 * 余额限制
	 */
	@ApiModelProperty(value = "余额限制")
	@JsonSerialize(using = BigDecimalToPlainStringSerializer.class)
	private BigDecimal balanceLimit;

	/**
	 * 预扣燃油费
	 */
	@ApiModelProperty(value = "预扣燃油费")
	@JsonSerialize(using = BigDecimalToPlainStringSerializer.class)
	private BigDecimal fuelFrozen;

	/**
	 * 平台分成比例（%）
	 */
	@ApiModelProperty(value = "平台分成比例（%）")
	@JsonSerialize(using = BigDecimalToPlainStringSerializer.class)
	private BigDecimal platformRatio;

	/**
	 * 客户分成比例（%）
	 */
	@ApiModelProperty(value = "客户分成比例（%）")
	@JsonSerialize(using = BigDecimalToPlainStringSerializer.class)
	private BigDecimal customerRatio;

	/**
	 * 简介
	 */
	@ApiModelProperty(value = "简介")
	private String profile;

	/**
	 * 创建时间
	 */
	@ApiModelProperty(value = "创建时间")
	private LocalDateTime createTime;

	/**
	 * 创建人id
	 */
	@ApiModelProperty(value = "创建人id")
	@JsonSerialize(using = ToStringSerializer.class)
	private Long createBy;

	/**
	 * 创建人名称
	 */
	@ApiModelProperty(value = "创建人名称")
	private String createName;

	/**
	 * 修改时间
	 */
	@ApiModelProperty(value = "修改时间")
	private LocalDateTime updateTime;

	/**
	 * 修改人id
	 */
	@ApiModelProperty(value = "修改人id")
	@JsonSerialize(using = ToStringSerializer.class)
	private Long updateBy;

	/**
	 * 修改人名称
	 */
	@ApiModelProperty(value = "修改人名称")
	private String updateName;

	/**
	 * 状态（0停用、1正常）
	 */
	@ApiModelProperty(value = "状态（0停用、1正常）")
	private String status;

	/**
	 * 是否删除（0否、null是）
	 */
	@TableLogic
	@ApiModelProperty(value = "是否删除（0否、null是）")
	private String isDeleted;

	/**
	 * 是否对用户开放( 0 否 1 是 )
	 */
	@ApiModelProperty(value = "是否对用户开放( 0 否 1 是 )")
	private String isOpen;

}
